// 查询题目
function getTestSoul (params) {
  return $axios({
    url: '/testSoul/findAll',
    method: 'get',
      params
  })
}

// 查询问题
function getTestQuestion (params) {
  return $axios({
    url: `/testSoul/findQuestion`,
    method: 'get',
      params
  })
}

// 查询答案
function getAnswerQuestion (params) {
  return $axios({
    url: '/testSoul/findAnswer',
    method: 'get',
    params
  })
}

// 修改答案
const editAnswer = (params) => {
  return $axios({
    url: '/editanswer',
    method: 'put',
    data: { ...params }
  })
}

// 新增答案
const addAnswer = (params) => {
  return $axios({
    url: '/addanswer',
    method: 'post',
    data: { ...params }
  })
}

// 删除答案
const deleteAnswer = (id) => {
    return $axios({
        url: '/deleteanswer',
        method: 'delete',
        params: { id }
    })
}

// 删除问题
const deleteQuestion = (id) => {
    return $axios({
        url: '/delete/question',
        method: 'delete',
        params: { id }
    })
}

// 新增问题
const addQuestion = (params) => {
    return $axios({
        url: '/add/question',
        method: 'post',
        data: { ...params }
    })
}

//新增题目
const addTest = (params) => {
    return $axios({
        url: '/add/test',
        method: 'post',
        data: { ...params }
    })
}

//删除题目
const deleteTest = (id) => {
    return $axios({
        url: '/delete/test',
        method: 'delete',
        params: { id }
    })
}